import RequestComp from "containers/request/request";
import NewRequestComp from "containers/request/new-edit-request";
import JDRequestEditComp from "containers/request/jd-request-edit";
import RequestEditComp from "containers/request/new-edit-request";
import RequestDetailComp from "containers/request/base-request-detail";
import NewBorrowComp from "containers/loan-billing/new-borrow";
import LoanDetailComp from "containers/loan-billing/loan-detail"

//申请单
const request = {
  key:'request',
  url: '/main/request',
  components: RequestComp,
  icon: 'file-unknown',
  company: true,
  fpItem: ['ca.web.disabled',],
  fpValue: [[false, undefined]],
  children: {
    //新建申请单
    newRequest: {
      key: 'new-request',
      url: '/main/request/new-request/:formOID/:applicantOID/:jobId/:ifProxy',
      components: NewRequestComp,
      parent: 'request'
    },
    //京东申请单编辑
    jdRequestEdit: {
      key: 'jd-request-edit',
      url: '/main/request/jd-request-edit/:formOID/:applicationOID',
      components: JDRequestEditComp,
      parent: 'request'
    },
    //编辑申请单
    requestEdit: {
      key: 'request-edit',
      url: '/main/request/request-edit/:formOID/:applicationOID',
      components: RequestEditComp,
      parent: 'request'
    },
    //申请单详情
    requestDetail: {
      key: 'request-detail',
      url: '/main/request/request-detail/:formOID/:applicationOID/:pageFrom',
      components: RequestDetailComp,
      parent: 'request'
    },
    //新建借款单
    //单行，多行新建
    newBorrow: {
      key: 'request-new-borrow',
      url: '/main/request/request-new-borrow/:formOID/:applicationOID/:jobId',
      components: NewBorrowComp,
      parent: 'my-borrow'
    },
    //借款单详情
    //多行编辑，单行&多行的非编辑
    loanDetail: {
      key: 'request-loan-detail',
      url: '/main/request/request-loan-detail/:formOID/:loanBillOID/:pageFrom/:applicationOID',
      components: LoanDetailComp,
      parent: 'my-borrow'
    },
    //编辑借款单
    //单行编辑
    editBorrow: {
      key: 'request-edit-borrow',
      url: '/main/request/request-edit-borrow/:formOID/:loanBillOID/:applicationOID',
      components: NewBorrowComp,
      parent: 'my-borrow'
    }
  }
};

export default request
